﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProgNetComponents.Design.Editors
{
    public abstract class BaseTypeEditor : BaseListEditor
    {
        protected abstract List<Type> GetSupportedTypes();

        protected override Dictionary<string, object> GetListBoxItems()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            List<Type> l = GetSupportedTypes();
            if (l != null)
            {
                foreach (Type t in l)
                {
                    if (!d.ContainsKey(t.FullName))
                        d.Add(t.FullName, t);
                }
            }
            return d;
        }
    }
}
